#pragma once
#include <atomic>

#include <QObject>
#include <QVector>
#include <QString>
#include <QImage>
#include <QThread>
#include <QMutex>

#include "xxWorker.h"

class xxManager : public QObject
{
	Q_OBJECT
public:
	xxManager(QObject* parent = nullptr);
	~xxManager();

	//Q_DISABLE_COPY_MOVE防止资源通过拷贝、赋值方式存在多份
	Q_DISABLE_COPY_MOVE(xxManager)

public:
	static xxManager& globalInstance();

public:
	void init();
	void shutdown();

private:
	QThread m_thread;
	xxWorker m_worker;
	QMutex m_mutex;
};

